package me.j360.springboot.simple.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.io.Serializable;

/**
 * Created with springbootweb -> me.j360.springboot.simple.entity.
 * User: min_xu
 * Date: 2015/7/29
 * Time: 11:07
 * 说明：
 */

@Entity
public class User implements Serializable {

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Id
    @GeneratedValue
    private Long id;
    @Column(nullable = false)
    private String name;

    protected User() {
        // no-args constructor required by JPA spec
        // this one is protected since it shouldn't be used directly
    }
    public User(String name) {
        this.name = name;

    }
    public String getName() {
        return this.name;
    }


}
